import time

from selenium import webdriver
from selenium.webdriver.common.by import By

driver=webdriver.Edge()
# driver.maximize_window()
driver.get('https://v.qq.com/')
time.sleep(5)

driver.find_element(By.ID,'mod_head_login').click()
time.sleep(2)
driver.find_element(By.XPATH,'//*[@id="txv-login-wnd"]/div[1]/div[3]/div/div/button/img').click()
time.sleep(2)
driver.find_element(By.XPATH,'//*[@id="txv-login-wnd"]/div[1]/div[2]/div[1]/button').click()
time.sleep(8)

driver.switch_to.frame(driver.find_element(By.ID,'ptlogin_iframe'))
time.sleep(8)
driver.find_element(By.ID,'switcher_plogin').click()
time.sleep(10)
# 输入账号
driver.find_element(By.CLASS_NAME,'inputstyle').send_keys('1441688225@qq.com')
time.sleep(2)

# 输入密码
driver.find_element(By.XPATH,'//*[@id="p"]').send_keys('xbw20120329XR')
time.sleep(2)

driver.find_element(By.ID,'login_button').click()
time.sleep(60)